<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  if ($messageStack->size('header') > 0) {
    echo '<div class="grid_24">' . $messageStack->output('header') . '</div>';
  }
?>

<div id="header" class="grid_24">
  <div id="storeLogo"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image(DIR_WS_IMAGES . 'store_logo.png', STORE_NAME) . '</a>'; ?></div>

  <div id="headerShortcuts">
<?php
  echo tep_draw_button(HEADER_TITLE_CART_CONTENTS . ($cart->count_contents() > 0 ? ' (' . $cart->count_contents() . ')' : ''), 'cart', tep_href_link(FILENAME_SHOPPING_CART)) .
       tep_draw_button(HEADER_TITLE_CHECKOUT, 'triangle-1-e', tep_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL')) .
       tep_draw_button(HEADER_TITLE_MY_ACCOUNT, 'person', tep_href_link(FILENAME_ACCOUNT, '', 'SSL'));

  if (tep_session_is_registered('customer_id')) {
    echo tep_draw_button(HEADER_TITLE_LOGOFF, null, tep_href_link(FILENAME_LOGOFF, '', 'SSL'));
  }
?>
  </div>

<script type="text/javascript">
  $("#headerShortcuts").buttonset();
</script>
</div>

<?php
	$PHP_SELF = end(explode('/',$_SERVER['PHP_SELF']));
?>
<div class="grid_24">
	<div class="top_menu_block">
		<div class="row11"><div class="inner1"><div class="inner2"><div class="inner3"></div></div></div></div><div class="row22"><div class="inner1 user_menu">
			<ul>
				<li><a <?php echo $PHP_SELF == FILENAME_DEFAULT ? 'class="active"':''; ?> href="./">Home</a></li>
				<li><a <?php echo $PHP_SELF == FILENAME_SHIPPING ? 'class="active"':''; ?>href="<?php echo tep_href_link(FILENAME_SHIPPING); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_SHIPPING; ?></a></li>
				<li><a <?php echo $PHP_SELF == FILENAME_PRIVACY ? 'class="active"':''; ?> href="<?php echo tep_href_link(FILENAME_PRIVACY); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_PRIVACY; ?></a></li>
				<li><a <?php echo $PHP_SELF == FILENAME_CONDITIONS ? 'class="active"':''; ?> href="<?php echo tep_href_link(FILENAME_CONDITIONS); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_CONDITIONS; ?></a></li>
				<li><a <?php echo $PHP_SELF == FILENAME_CONTACT_US ? 'class="active"':''; ?> href="<?php echo tep_href_link(FILENAME_CONTACT_US); ?>"><?php echo MODULE_BOXES_INFORMATION_BOX_CONTACT; ?></a></li>
			</ul>
		</div></div><div class="row33"><div class="inner1"><div class="inner2"><div class="inner3"></div></div></div></div>
	</div>
</div>

<?php
if ($PHP_SELF == FILENAME_DEFAULT && $slider = tep_banner_exists('dynamic', 'Slide')) {
	$banners = tep_display_slider('Slide');
?>
<div class="slider-wrapper theme-default">
    <div id="slider" class="nivoSlider">
<?php foreach($banners as $banner) {
	if($banner['banners_url'] != '' )
	{
		echo '<a href="'. $banner['banners_url'] .'"><img src="images/'. $banner['banners_image'] .'" alt="'. $banner['banners_title'] .'" /></a>';		
	}
	else
	{
		echo '<img src="images/'. $banner['banners_image'] .'" alt="'. $banner['banners_title'] .'" />';
	}
} ?>
    </div>
</div>
<script type="text/javascript">
$(window).load(function() {
    $('#slider').nivoSlider({
    	controlNav: false
    });
});
</script>
<?php } ?>
<div id="mainPage">
<?php if($PHP_SELF != FILENAME_DEFAULT) { ?>
<div class="grid_24">
  <div class="nav_bar"><?php echo $breadcrumb->trail(' &raquo; '); ?></div>
</div>
<?php } ?>
<div class="content_t_indent_row"><img src="images/theme/pixel_trans.gif" alt="" width="1" height="1"><br></div>
<?php
  if (isset($HTTP_GET_VARS['error_message']) && tep_not_null($HTTP_GET_VARS['error_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerError">
    <td class="headerError"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['error_message']))); ?></td>
  </tr>
</table>
<?php
  }

  if (isset($HTTP_GET_VARS['info_message']) && tep_not_null($HTTP_GET_VARS['info_message'])) {
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
  <tr class="headerInfo">
    <td class="headerInfo"><?php echo htmlspecialchars(stripslashes(urldecode($HTTP_GET_VARS['info_message']))); ?></td>
  </tr>
</table>
<?php
  }
?>
